Skip to content

feat(table): send x-kyte-fields projection header from KyteTable (KYTE-#190) - #39

Open
kennethphough wants to merge 1 commit into
masterfrom
feature/190-kytetable-projection
Open

feat(table): send x-kyte-fields projection header from KyteTable (KYTE-#190)#39
kennethphough wants to merge 1 commit into
masterfrom
feature/190-kytetable-projection

Conversation

@kennethphough

Copy link
Copy Markdown
Member

The client half of the KYTE-#190 column-projection feature — makes it live end-to-end.

What

KyteTable._loadData now sends an x-kyte-fields header (one line) listing the columns the table displays. The server then returns only those columns for the list read, keeping large TEXT/BLOB columns out of list payloads.

  • The value is the same field list KyteTable already builds from columnDefs (kyte-source.js:1491-1496) — dotted FK paths like client.name included. Zero new developer config.
  • Sent as a header distinct from x-kyte-page-search-fields (search = which columns to LIKE-match; projection = which columns to return).

Server pairing

Requires kyte-php ≥ 4.16 (the generic ModelController projection wiring). The server maps dotted FK paths to their base column and always re-adds id + FK ids, so row actions, edit/delete, and FK labels keep working. Backward compatible — an older server ignores the header.

Validation

  • Vitest suite green (17 tests) — the source still loads/parses; KyteTable isn't in the unit harness (no DOM/jQuery mocks), so recommend a manual smoke on a real table before release.
  • Release (CDN) is a separate manual step (this repo's release.sh → deploy ritual) — not triggered by this PR.

Refs #190.

🤖 Generated with Claude Code

…E-#190)

KyteTable now sends an `x-kyte-fields` header listing the columns it displays,
so a list read returns only those columns instead of every column — keeping
large TEXT/BLOB columns out of list payloads. The value is the same field list
the table already derives from its columnDefs (dotted FK paths like
`client.name` included), sent as a header distinct from
`x-kyte-page-search-fields` (search = which columns to match; projection =
which columns to return).

Pairs with the kyte-php >= 4.16 server wiring, which maps dotted FK paths to
their base column and always re-adds id + FK ids, so row actions and FK labels
keep working. Backward compatible: an older server ignores the header.

Vitest suite green (17 tests). Release (CDN) is a separate manual step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant